added SSCLI 1.0
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / VBADONETDataServiceSL3Client.Web / My Project / MyExtensions / MyWebExtension.vb
blob78c7c19ba0ed465eea259a55c183febb945fae1b
1 #If _MyType <> "Empty" Then
3 Namespace My
4 ''' <summary>
5 ''' Module used to define the properties that are available in the My Namespace for Web projects.
6 ''' </summary>
7 ''' <remarks></remarks>
8 <Global.Microsoft.VisualBasic.HideModuleName()> _
9 Module MyWebExtension
10 Private s_Computer As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Devices.ServerComputer)
11 Private s_User As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.ApplicationServices.WebUser)
12 Private s_Log As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Logging.AspLog)
13 ''' <summary>
14 ''' Returns information about the host computer.
15 ''' </summary>
16 <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
17 Friend ReadOnly Property Computer() As Global.Microsoft.VisualBasic.Devices.ServerComputer
18 Get
19 Return s_Computer.GetInstance()
20 End Get
21 End Property
22 ''' <summary>
23 ''' Returns information for the current Web user.
24 ''' </summary>
25 <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
26 Friend ReadOnly Property User() As Global.Microsoft.VisualBasic.ApplicationServices.WebUser
27 Get
28 Return s_User.GetInstance()
29 End Get
30 End Property
31 ''' <summary>
32 ''' Returns Request object.
33 ''' </summary>
34 <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
35 <Global.System.ComponentModel.Design.HelpKeyword("My.Request")> _
36 Friend ReadOnly Property Request() As Global.System.Web.HttpRequest
37 <Global.System.Diagnostics.DebuggerHidden()> _
38 Get
39 Dim CurrentContext As Global.System.Web.HttpContext = Global.System.Web.HttpContext.Current
40 If CurrentContext IsNot Nothing Then
41 Return CurrentContext.Request
42 End If
43 Return Nothing
44 End Get
45 End Property
46 ''' <summary>
47 ''' Returns Response object.
48 ''' </summary>
49 <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
50 <Global.System.ComponentModel.Design.HelpKeyword("My.Response")> _
51 Friend ReadOnly Property Response() As Global.System.Web.HttpResponse
52 <Global.System.Diagnostics.DebuggerHidden()> _
53 Get
54 Dim CurrentContext As Global.System.Web.HttpContext = Global.System.Web.HttpContext.Current
55 If CurrentContext IsNot Nothing Then
56 Return CurrentContext.Response
57 End If
58 Return Nothing
59 End Get
60 End Property
61 ''' <summary>
62 ''' Returns the Asp log object.
63 ''' </summary>
64 <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _
65 Friend ReadOnly Property Log() As Global.Microsoft.VisualBasic.Logging.AspLog
66 Get
67 Return s_Log.GetInstance()
68 End Get
69 End Property
70 End Module
71 End Namespace
73 #End If